package liskov_substitution

import (
	"errors"
	"fmt"
)

type BadOstrichBird struct {
	BadNormalBird
}

func NewBadOstrichBird(id int, name string) IBadBird {
	return &BadOstrichBird{
		*(NewBadNormalBird(id, name).(*BadNormalBird)),
	}
}

func (me *BadOstrichBird) Fly() error {
	return errors.New(fmt.Sprintf("BadOstrichBird.Fly, cannot fly, id=%v, name=%v\n", me.ID(), me.Name()))
}

func (me *BadOstrichBird) Run() error {
	fmt.Printf("BadOstrichBird.Run, id=%v, name=%v\n", me.ID(), me.Name())
	return nil
}